package com.lifeng.patterns.singleton;

/**
 * Created by lifeng on 2019/9/11.
 */
public class SingleThree {
    /**私有化构造方法*/
    private SingleThree(){}

    /**内部类*/
    private static class SingleThreeHelp{
        static SingleThree instance = new SingleThree();
    }
    /**以自己实例为返回值的公有静态方法*/
    public static SingleThree getInstance(){
        return SingleThreeHelp.instance;
    }
}
